﻿<Window x:Class="YLServerInterface.Forms.frmWorkItemProcess"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:userControls="clr-namespace:YLServerInterface.UserControls"
        Title="frmWorkItemProcess" Height="300" Width="300" WindowStartupLocation="CenterScreen"
        >
    <Window.Resources>
        <Style x:Key="{x:Type ListBoxItem}" x:Name="lstParamStyle" TargetType="ListBoxItem">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="ListBoxItem">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width=".3*"/>
                                <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <Label  Grid.Column="0"
                                Name="lblParamter" Content="{Binding mMemo}"/>
                            <TextBlock Grid.Column="1"
                                 MinWidth="100"
                                     Text="{Binding mValue}"
                                    ></TextBlock>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </Window.Resources>

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Grid Grid.Row="0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Label Grid.Column="0">FTP上保存位置：</Label>
            <TextBlock Grid.Column="1"
            Name="txtbFtpSaveDir" Text="{Binding FilesRelativeFolder}" ></TextBlock>
        </Grid>
        <Grid   Grid.Row="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Label Grid.Column="0">本机上保存位置：</Label>
            <TextBox Grid.Column="1" IsReadOnly="True"
            Name="txtbLocalSaveDir" ></TextBox>
        </Grid>
        <Grid Grid.Row="2">
            <Grid.RowDefinitions>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="auto"/>
            </Grid.RowDefinitions>
            <ListBox  Grid.Row="0" 
                  Name="lstParamters"
                  ItemsSource="{Binding}"
                  >
            </ListBox>
            <Button Grid.Row="1"
                    Name="btnMakeValuegif" Click="btnMakeValuegif_Click">生成参数的gif图片</Button>
        </Grid>
        <Grid Grid.Row="3" 
            Name="gridImageCutters"
            >
            <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="auto"/>
            </Grid.RowDefinitions>
            <ScrollViewer Grid.Row="0"
                 HorizontalScrollBarVisibility="Auto"
                 VerticalScrollBarVisibility="Auto"
                >
                <WrapPanel
                    Name="wPnlCutterContainer"
                    >
                </WrapPanel>
            </ScrollViewer>
            <Button Grid.Row="1"
                    Name="btnMakePhotoAndExe" Click="btnMakePhotoAndExe_Click">生成截图并打包</Button>
        </Grid>
        <Button Grid.Row="4"
                Name="btnUploadWorkItem" Click="btnUploadWorkItem_Click">上传到服务器</Button>
    </Grid>
</Window>
